﻿//++
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Module Name:
//
//    ContactInfo.cs
//
// Abstract:
//    
//    Contains contact data needed to look up a contact.
//
//--

using System;
using System.Diagnostics;

namespace Microsoft.EnhancedReminders
{
    /// <summary>
    /// Contains data associated with a name specified by a NotificationPeopleCondition.
    /// </summary>
    [Serializable()]
    public sealed class ContactInfo
    {
        private readonly string _alias;
        private readonly string _name;
        private readonly string _entryId;

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="alias">Email alias of the contact or null if not available (e.g. a personal contact).</param>
        /// <param name="entryId">The unique identifier for the contact.</param>
        /// <param name="name">The display name of the contact or null if none available.</param>
        public ContactInfo(string alias, string entryId, string name)
        {
            Debug.Assert(!String.IsNullOrEmpty(name), "name");
            Debug.Assert(!String.IsNullOrEmpty(entryId), "entryId");

            _alias = alias;
            _entryId = entryId;
            _name = name;
        }

        /// <summary>
        /// Email alias of the contact or null if not available (e.g. a personal contact).
        /// </summary>
        public string Alias
        {
            get
            {
                return _alias;
            }
        }

        /// <summary>
        /// Unique identifier provided by Exchange for a contact.  This ID is provided both
        /// for personal contacts and for contacts in the Global Address List.
        /// </summary>
        public string EntryId
        {
            get
            {
                return _entryId;
            }
        }

        /// <summary>
        /// The display name of the contact.
        /// </summary>
        public string Name
        {
            get
            {
                return _name;
            }
        }
    }
}
